<!--注意：此页内容与bookiki/search相同，现在暂时没用。下一步可以一层一层展示目录。
现在点击分类，结果将由bookiki/search展示
-->
<?php
$this->load->view("header");
?>
<div id="main_content">
<div class="titlebar"><?= $title;?></div>

<?php
$this->load->view("bookiki/leftcolumn");
?>

<div id="book_list" class="book_list">
<?php
if($bookarray==null)
echo "抱歉，暂时没有搜索结果。";
else{
  foreach($bookarray as $book){?>
  <table id="book_item" cellspacing="0" cellpadding="0" class="BookItem" onmouseover="this.style.background = &quot;#f2f3f4&quot;;" onmouseout="this.style.background = &quot;#ffffff&quot;;" >
    <tbody>
    <tr class="tr-margin"><td></tr>
    <tr>
    <td class="td-thumb"><div class="thumb" style="left: 6px; padding-bottom: 0px;">
    <a href="<?=site_url()?>/post/getpost_ofbook?bookid=<?=$book->id?>&go=yes" name="landingpagelink"><img alt="" class="thumb-img" style="border: none;" src="<?php echo base_url()."uploads/".$book->pic?>" onerror="this.src='http://www.bookiki.net/uploads/no_image.jpg'"></a>
    </div>
    </td>
    <td valign="top" align="left" >
           <table class="BookInfo" cellspacing="0" cellpadding="0" >
            <tbody>
            <tr><td class="title"  align="left"><a href="<?=site_url()?>/post/getpost_ofbook?bookid=<?=$book->id?>&go=yes" name="landingpagelink"><?=$book->title?></a>&nbsp;-&nbsp;<span><?=$book->author?></span>
            </td></tr>
            <tr><td class="tracks" colspan="10" align="left">出版社：<?=$book->publisher?>&nbsp;&nbsp;&nbsp;&nbsp;第<?=$book->edition?>版&nbsp;&nbsp;&nbsp;&nbsp;
            语言:<?php
                    $lan=$book->language;
                    switch ($lan){
                     case "cn": echo "中文";break;
                     case "en": echo "英文";break;
                    }
                    ?></td>
            </tr>
            <tr><td class="tracks" colspan="10" align="left">原价：<?=$book->price?></td></tr>
            <tr><table><tr>
              <td><?php for($i=1;$i<85;$i++) echo "&nbsp;";?></td>
              <td class="tracks" colspan="1" align="left">
              <form method=get action="<?=site_url()?>/post/getpost_ofbook">
              <input type="hidden" name="bookid" value="<?=$book->id?>"/>
              <input type="hidden" name="go" value="yes"/>
              <input class="button" type="submit"  value="谁在买卖"/>
              </form>
            </td>
            <td>&nbsp;&nbsp;</td>
            <td class="tracks" colspan="1" align="left">
              <form method=get action="<?=site_url()?>/post/salepost">
              <input type="hidden" name="bookid" value="<?=$book->id?>"/>
              <input type="hidden" name="go" value="yes"/>
              <input class="button" type="submit"  value="我要出售"/>
              </form>
            </td>
            <td>&nbsp;&nbsp;</td>
            <td class="tracks" colspan="1" align="left">
              <form method=get action="<?=site_url()?>/post/wantedpost">
              <input type="hidden" name="bookid" value="<?=$book->id?>"/>
              <input type="hidden" name="go" value="yes"/>
              <input class="button" type="submit"  value="我要求购"/>
              </form>
            </td></tr></table>
            </tr>
            </tbody>
            </table>
      </td>
    </tr>
    </tbody>
   </table>

<?php
 } //end of foreach
} //end of else
?>

<div class="pagination">
<?php echo $this->mypagination->create_links(); ?>
</div>
<hr/>
如果没找到你想要的图书，请输入ISBN添加（ISBN位于封底条形码的上方）：
<form method="get" action="<?=site_url()?>/book/addbook">
    <input type="text" name="isbn" />
    <input type="submit" name="submit" value="添加"/>
</form>


</div><!--book_list-->

<?php
$this->load->view("footer");
?>

